<?php

$email = isset($_POST["email"]) ? $_POST["email"] : '';
$status = isset($_POST["status"]) ? $_POST["status"] : '';
if (empty($email) || empty($status))
{
	header("HTTP/1.1 301 Moved Permanently");
	header("LOCATION: http://www.maibey.com");
	exit();
}
else
{
	$con = mysql_connect("localhost","love","1234567");
	if (!$con)
	  {
	  die('Could not connect: ' . mysql_error());
	  }
	mysql_select_db("Barn", $con);
	
	$sql = 'UPDATE `Barn`.`Alllovebling_Email_Status`  SET `Status` = '.$status.' where email ="'.$email.'"';

	$rs = mysql_query($sql,$con);
	if($rs)
	  {
			header("HTTP/1.1 301 Moved Permanently");
			header("LOCATION: http://www.maibey.com");
			mysql_close($con);
			exit();
	  }
	mysql_close($con);
}
?>